<html>
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="keywords" content="电视直播,国内电视，直播源，免费电视，m3u8工具">
        <meta name="description" content="电视直播源整合,免费的电视频道">
        <title>电视直播聚合-每日更新</title>
        <link href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
        <script src="https://cdn.bootcss.com/jquery/3.5.0/jquery.js"></script>
        <script  charset="utf-8" src="js/channels.js"></script>
        <style>

            #headarea
            {
                text-align: center;

            }

            #headarea p{
                font-size: 5vw;
                color:olivedrab;
                font-weight: bold;
            }

            #infoarea{
                position: absolute;
                left: 0;
    
                overflow:scroll;
                clear:both;
            }    

            #playlist{
                border-radius:15px;
                padding:1vh;
                background-color:white;

            }
            #playlist div{
                overflow:hidden;clear:both;
            }

            #playlist div p{
                line-height: 4vw;
                font-size: 4vw;
                color:olivedrab;
                font-weight: bold;
                margin:2vh 0vw 2vh 0vw;
                text-align: left;
            }

            #playlist ul{
                overflow:hidden;clear:both;
                padding:0px;
                margin: 0px;
                width: 100%;  
          
            }

           #playlist li{
                margin: 2vw 0vw 2vh 0vw;
                list-style: none;
                float: left;
                width: 33%;
                line-height: 3vw;
                font-size: 3vw;
                text-align: left;
                color:olivedrab;
               
            }


            #dumpurlarea{
                margin: 2vh 0vw 2vh 0vw;
                text-align: center;
            }
            #dumpurlarea input {
                font-size: 3vw;   
                font-weight: bold;                             
                color: olivedrab;
            }

            #codearea{
                margin: 2vh 0vw 2vh 0vw;
                width: 100%;
                overflow: hidden;
                clear: both;
                text-align: center;
            }

            #codearea img{
                
                width: 60%;
            }

            #donatearea
            {

                text-align: center;

                margin: 2vh 0vw 2vh 0vw;
            }

            #donatearea button
            {
                color:red;
                font-size: 3vw;
                font-weight: bold;
            }
        </style>
        

    </head>
    <body style="background-color:#eee;" >
        <div id="headarea">
            <p>电视直播聚合 - 每日更新</p>
        </div>
        

        <div id="infoarea">        
            <div id="dumpurlarea">
                
                <input id="dumpurl" type="text" style="width: 50%;" />
                <input type="button" onclick="dump()" value="自定义m3u8地址解析" />    
            </div>


            
            <div id="playlist">
        
            </div>

 
        </div>  
        
        <script type="text/javascript">
        
        var result="";
        var channelslist = $(channels);

        channelslist.each(function(index,record){
            result += "<div><p>"+record.firstword+"</p>";
            result +="<ul>";
            $(record.list).each(function(i,r){
                result += "<li>";
                result += "<a class='fa fa-rss-square' onclick=play('"+r.url+"','"+r.title+"')>"+r.title+"</a>";
                result += "</li>";   
            });
            result+="</ul></div>";

        });        

        $("#playlist").html(result);


        function dump()
        {
            var address = $("#dumpurl").val();
            if(address!="")
            {
                play(address,"自定义");
            }
            
        }

        function play(m3u8address,title)
        {
            layer.open({
                type: 2,
                title:false,
                closeBtn:0,
                shadeClose: false, //点击遮罩关闭
                area: ['95%', '45%'],
                content: 'play.html?address='+m3u8address+"&title="+title

            });
            //location= 'index.html?address='+m3u8address+'&title='+title;
        }
        
        function getQueryVariable(variable)
        {
            var query = window.location.search.substring(1);
            var vars = query.split("&");
            for (var i=0;i<vars.length;i++) {
                    var pair = vars[i].split("=");
                    if(pair[0] == variable){return pair[1];}
            }
            return(false);
        }
        
        

        </script>

        <script src="https://www.layuicdn.com/layer-v3.1.1/layer.js"></script>

        <script>
            var _hmt = _hmt || [];
            (function() {
              var hm = document.createElement("script");
              hm.src = "https://hm.baidu.com/hm.js?8366b1d22e5787bdd43fc9bc472d435f";
              var s = document.getElementsByTagName("script")[0]; 
              s.parentNode.insertBefore(hm, s);
            })();
        </script>
        <!--<script data-ad-client="ca-pub-2611792127181520" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>-->
    </body>
</html>